<!DOCTYPE html>
<html>
<head>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-nodeiterator-detach">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("This test checks that NodeIterator.detach() is a no-op.");

function createSampleDOM()
{
    var div = document.createElement('div');
    div.id = 'a';
    div.innerHTML = '<div id="b">';
    return div;
}

var root = createSampleDOM();
var iterator = document.createNodeIterator(root);
shouldBeEqualToString('iterator.nextNode().id', 'a');
shouldNotThrow('iterator.detach()');
shouldBeEqualToString('iterator.nextNode().id', 'b');
</script>
</body>
</html>
